home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCGetScanSize.z / SCGetScanSize
Encoding:
Text File  |  2002-10-03  |  3.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. SSSSCCCCGGGGeeeettttSSSSccccaaaannnnSSSSiiiizzzzeeee((((3333))))                 IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                  SSSSCCCCGGGGeeeettttSSSSccccaaaannnnSSSSiiiizzzzeeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SCGetScanSize - Determine the amount of image data to be scanned
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccaaaannnnnnnneeeerrrr....hhhh>>>>
  14.  
  15.      iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSccccaaaannnnSSSSiiiizzzzeeee((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, lllloooonnnngggg ****wwwwiiiiddddtttthhhh,,,, lllloooonnnngggg ****hhhheeeeiiiigggghhhhtttt,,,,
  16.                        lllloooonnnngggg ****bbbbyyyytttteeeessssPPPPeeeerrrrLLLLiiiinnnneeee))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _S_C_G_e_t_S_c_a_n_S_i_z_e is called after calling _S_C_S_e_t_u_p(3) to determine how much
  20.      image data to retrieve from the scanner.  *_w_i_d_t_h gets filled in with the
  21.      number of pixels in each row, *_h_e_i_g_h_t gets filled in with the number of
  22.      rows in the image, and *_b_y_t_e_s_P_e_r_L_i_n_e gets filled in with the number of
  23.      bytes in each row.
  24.  
  25.      If the data type being scanned has a _p_a_c_k_i_n_g of SSSSCCCC____PPPPLLLLAAAANNNNAAAARRRR, then the total
  26.      number of bytes to be scanned is given by the number of channels *
  27.      *_h_e_i_g_h_t * *_b_y_t_e_s_P_e_r_L_i_n_e.  Otherwise, the total number of bytes is simply
  28.      *_h_e_i_g_h_t * *_b_y_t_e_s_P_e_r_L_i_n_e.  See _S_C_S_e_t_u_p(3) and _S_C_G_e_t_D_a_t_a_T_y_p_e_s(3) for more
  29.      information about data types.
  30.  
  31.      After calling _S_C_G_e_t_S_c_a_n_S_i_z_e, a scanning application should allocate
  32.      buffers and write image file headers as appropriate, and then call
  33.      _S_C_S_c_a_n(3) or _S_C_S_c_a_n_F_D(3) to start the actual scan.
  34.  
  35. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  36.      _S_C_G_e_t_S_c_a_n_S_i_z_e returns 0 if successful.  If an error occurs, -1 is
  37.      returned and _S_C_e_r_r_n_o is set to indicate the reason for failure.
  38.  
  39. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  40.      _S_C_G_e_t_S_c_a_n_S_i_z_e will fail under the following circumstances.
  41.  
  42.      SCECOMM                  Error communicating with scanner driver
  43.  
  44.      SCEDEV                   Scanner driver error
  45.  
  46. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  47.      _l_i_b_s_c_a_n(3), _S_C_S_e_t_u_p(3), _S_C_S_c_a_n(3), _S_C_S_c_a_n_F_D(3).
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.